import { createFromIconfontCN } from '@ant-design/icons';
import styles from './index.module.scss';

const IconFont = createFromIconfontCN({
  scriptUrl: '/src/assets/icon/iconfont.js',
});

type Data = {
  words_num: number;
  thumbs_up: number;
  comment_num: number;
  page_view: number;
};

const DisplayData: React.FC<Data> = ({
  words_num,
  thumbs_up,
  comment_num,
  page_view,
}) => {
  return (
    <>
      <span className={styles.icon}>
        <IconFont type="blog-zishu" />
        {words_num}
      </span>
      <span className={styles.icon}>
        <IconFont type="blog-icon" />
        {thumbs_up}
      </span>
      <span className={styles.icon}>
        <IconFont type="blog-pinglun" />
        {comment_num}
      </span>
      <span className={styles.icon}>
        <IconFont type="blog-liulanliang" />
        {page_view}
      </span>
    </>
  );
};

export default DisplayData;
